home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 23 / CU Amiga - Super CD-ROM 23 (June 1998).iso / CreatingGames / Utilities / Amos / demo3 / Ninja.AMOS / Ninja.amosSourceCode < prev    next >
Encoding:
AMOS Source Code  |  1980-07-24  |  7.1 KB  |  308 lines

  1. '
  2. '                       *******************
  3. '                       *  NINJA MISSION  *
  4. '                       *******************              
  5. '
  6. '               A Public Domain game by Fernando Bartra (1995) 
  7. '  
  8. '
  9. GAMEINTRO:
  10. ' SN=Sessions  UN=unarmed  Bo=bo  ST=shuriken star   SH=shadows  
  11. SN=2 : UN=0 : BO=0 : ST=0 : SH=0
  12. ' LI=life  ED=enemy damage  MO=money  REI=princess stat MA=magic bo
  13. LI=100 : MO=0 : REI=0 : MA=0
  14. Cls 
  15. For A=0 To 2
  16.   Print : Centre ""
  17.   Print : Centre ""
  18. Next A
  19. Pen 0
  20. Curs Off : Centre "'AceCracker'"
  21. Print 
  22. Print : Centre " "
  23. Print 
  24. Print : Centre "Fernando Bartra"
  25. Print 
  26. Print : Centre "presents"
  27. Set Rainbow 1,1,4097,"","",""
  28. For Y=0 To 4095
  29.   Rain(1,Y)=Y
  30. Next Y
  31. For C=0 To 4095-255
  32.   Rainbow 1,C,40,255
  33. Next C
  34. Print 
  35. Print 
  36. Centre "NINJA MISSION"
  37. Wait Key 
  38. Cls 
  39. Centre "Instructions:"
  40. Print " "
  41. Print " "
  42. Print "    At beginning of game, go to the"
  43. Print "temple to train your skills before"
  44. Print "you fight. You can train a skill by"
  45. Print "pressing the number of the skill shown"
  46. Print "on screen. Practice different skills"
  47. Print "and try them on fight. The easiest"
  48. Print "mission is fighting the punk, try that"
  49. Print "before going on to harder ones."
  50. Print "    You will have to find for yourself"
  51. Print "what missions to do later and in which"
  52. Print "order."
  53. Print "    Upon succeeding in a mission you"
  54. Print "will get a practice session and a cash"
  55. Print "prize to buy life energy."
  56. Print " "
  57. Print "    This is a role-playing game."
  58. Print "    Good Luck rescuing the princess!!!"
  59. Print " "
  60. Print " "
  61. Centre "press any key"
  62. Wait Key 
  63. Cls 
  64. Print " If you like this game and want to"
  65. Print "send me a line or suggestions on how"
  66. Print "to improve the game, write to me at"
  67. Print " "
  68. Print "  Fernando Bartra"
  69. Print "  e-mail address:"
  70. Print "  fer007@scri.fsu.edu"
  71. Print " "
  72. Print " Any ideas will be appreciated."
  73. Print " "
  74. Print " "
  75. Centre "press any key to start"
  76. Wait Key 
  77. '   ----------------->   Load Title pic and music   <--------------- 
  78. Cls 
  79. 'Load Iff "Ninja Mission:NinjaTitle.pic",1 
  80. Wait 10
  81. Unpack 2 To 0
  82. Wait Key 
  83. '----------------------------->   Temple Menu
  84. TEMPLE:
  85. 'Load Iff "Ninja Mission:Temple.pic",1 
  86. Unpack 3 To 0
  87. Do 
  88.   While K$=""
  89.     K$=Inkey$
  90.   Wend 
  91.   If K$="1" Then K$="" : Goto TRAINMENU
  92.   If K$="2" Then K$="" : Goto MISSIONMENU
  93.   K$=""
  94. Loop 
  95. '----------------------------------->   Train menu 
  96. TRAINMENU:
  97. 'Load Iff "Ninja Mission:TrainMenu.pic",1
  98. Unpack 4 To 0
  99. Locate 18,5 : Print UN
  100. Locate 12,8 : Print BO
  101. Locate 12,11 : Print ST
  102. Locate 12,13 : Print SH
  103. Locate 12,22 : Print SN
  104. Do 
  105.   While K$=""
  106.     K$=Inkey$
  107.   Wend 
  108.   If K$="1" Then K$="" : Goto UADD
  109.   If K$="2" Then K$="" : Goto BADD
  110.   If K$="3" Then K$="" : Goto EADD
  111.   If K$="4" Then K$="" : Goto SADD
  112.   If K$="5" Then K$="" : Goto DISKMENU
  113.   If K$="6" Then K$="" : Goto MISSIONMENU
  114.   K$=""
  115. Loop 
  116. ' add unarmed skill
  117. UADD:
  118. If SN<1 Then Goto TRAINMENU
  119. If UN=3 Then Goto TRAINMENU
  120. SN=SN-1 : UN=UN+1 : Goto TRAINMENU
  121. ' add bo skill 
  122. BADD:
  123. If SN<1 Then Goto TRAINMENU
  124. If BO=3 Then Goto TRAINMENU
  125. SN=SN-1 : BO=BO+1 : Goto TRAINMENU
  126. ' add shuriken (Estrella) skill
  127. EADD:
  128. If SN<1 Then Goto TRAINMENU
  129. If ST=3 Then Goto TRAINMENU
  130. SN=SN-1 : ST=ST+1 : Goto TRAINMENU
  131. ' add hide in shadows skill
  132. SADD:
  133. If SN<1 Then Goto TRAINMENU
  134. If SH=3 Then Goto TRAINMENU
  135. SN=SN-1 : SH=SH+1 : Goto TRAINMENU
  136. '-------------------------------------->    Disk Menu
  137. DISKMENU:
  138. 'Load Iff "Ninja Mission:DiskMenu.pic",1 
  139. Unpack 5 To 0
  140. Wait Key 
  141. Goto TRAINMENU
  142. '-------------------------------------->    Mission menu 
  143. MISSIONMENU:
  144. E=1 : M$="1-2-3-4 fight"
  145. 'Load Iff "NINJA Mission:MissionMenu.pic",1
  146. Unpack 6 To 0
  147. K$=""
  148. Do 
  149.   While K$=""
  150.     K$=Inkey$
  151.   Wend 
  152.   If K$="1" Then Goto PUNKMISSION
  153.   If K$="2" Then Goto SWORDMISSION
  154.   If K$="3" Then Goto PRINCESSMISSION
  155.   If K$="4" Then Goto WHALEMISSION
  156.   If K$="5" Then Goto BUYMISSION
  157.   K$=""
  158. Loop 
  159. '-------------------------------->  Punk Mission 
  160. PUNKMISSION:
  161. 'PU=punk life  ED=enemy damage  CP=cash prize
  162.   PU=100 : ED=15 : CP=10
  163. 'Load Iff "Ninja Mission:Punk Vs Ninja.pic",1
  164. Unpack 7 To 0
  165.   Goto FIGHT
  166. '
  167. '-----------------------   Fight 
  168. FIGHT:
  169.   If LI<0 Then LI=0
  170.   If PU<0 Then PU=0
  171. Locate 1,23 : Print "life" : Locate 6,23 : Print LI;"%"
  172. Locate 12,23 : Print "enemy" : Locate 18,23 : Print PU;"%"
  173. Locate 24,23 : Print M$
  174.   If LI<1 Then Goto VPUNK
  175.   If PU<1 Then Goto VNINJA
  176. K$=""
  177. Do 
  178.   While K$=""
  179.     K$=Inkey$
  180.   Wend 
  181.   If K$="1" Then K$="" : Goto UPUNK
  182.   If K$="2" Then K$="" : Goto BPUNK
  183.   If K$="3" Then K$="" : Goto SPUNK
  184.   If K$="4" Then K$="" : Goto HPUNK
  185.   K$=""
  186. Loop 
  187. '----lose, win, and weapons routine
  188. VPUNK:
  189. Wait 100
  190. Pen 0
  191. Locate 5,0 : Print "you lost the fight"
  192.   If REI=1 Then REI=REI-1
  193.   If MA=2 Then MA=0
  194. Wait Key 
  195. Locate 5,0 : Print "game over, press a key to restart"
  196. Wait Key 
  197. Goto GAMEINTRO
  198. VNINJA:
  199. Wait 100
  200. Pen 0
  201. Locate 5,0 : Print "you won the fight!!"
  202. Wait Key 
  203. 'Load Iff "Ninja Mission:Victory.pic",1
  204. Unpack 8 To 0
  205. SN=SN+1 : LI=LI+100 : MO=MO+CP
  206. Wait Key 
  207.   If MA=2 Then Goto MAGICBO
  208.   If REI=1 Then REI=2 : Unpack 16 To 0 : Wait Key 
  209. Goto TEMPLE
  210. UPUNK:
  211. M$="1-UNARMED      "
  212.   If UN=0 Then DAM=5
  213.   If UN=1 Then DAM=10
  214.   If UN=2 Then DAM=15
  215.   If UN=3 Then DAM=20
  216. LI=LI-ED : PU=PU-DAM
  217. Goto FIGHT
  218. BPUNK:
  219. M$="2-BO           "
  220.   If BO=0 Then DAM=5
  221.   If BO=1 Then DAM=20
  222.   If BO=2 Then DAM=25
  223.   If BO=3 Then DAM=30
  224.   If MA=1 Then DAM=DAM+100
  225. LI=LI-ED : PU=PU-DAM
  226. Goto FIGHT
  227. SPUNK:
  228.   If E<1 Then M$="no more stars" : LI=LI-ED : Goto FIGHT
  229. M$="3-shuriken     "
  230.   If ST=0 Then DAM=20
  231.   If ST=1 Then DAM=35
  232.   If ST=2 Then DAM=40
  233.   If ST=3 Then DAM=45
  234. LI=LI-ED : PU=PU-DAM : E=E-1
  235. Goto FIGHT
  236. HPUNK:
  237. M$="4-Shadow attack"
  238.   If SH=0 Then DAM=0
  239.   If SH=1 Then DAM=15
  240.   If SH=2 Then DAM=35
  241.   If SH=3 Then DAM=70
  242. LI=LI-ED : PU=PU-DAM
  243. Goto FIGHT
  244. '
  245. '-------------------------------->   Sword Mission 
  246. SWORDMISSION:
  247. 'Load Iff "Ninja Mission:SwordMission.pic",1 
  248. Unpack 9 To 0
  249. Wait Key 
  250. 'Load Iff "Ninja Mission:Samurai Vs Ninja.pic",1 
  251. Unpack 10 To 0
  252. 'PU=enemys energy  ED=enemy damage   CP=cash prize 
  253. PU=200 : ED=60 : CP=30
  254.   If MA=0 Then MA=2
  255. Goto FIGHT
  256. '
  257. '------------------------------------->  Princess Mission
  258. PRINCESSMISSION:
  259. 'Load Iff "Ninja Mission:CastleMission.pic",1
  260. Unpack 11 To 0
  261. Wait Key 
  262. 'PU=enemy energy   ED=enemy damage  CP=cash prize REI=princess count 
  263. PU=400 : ED=100 : CP=100 : REI=REI+1
  264. 'Load Iff "Ninja Mission:Castlefight.pic",1
  265. Unpack 12 To 0
  266. Goto FIGHT
  267. '
  268. '---------------------------------------->  Whales Mission 
  269. WHALEMISSION:
  270. 'Load Iff "Ninja Mission:WhaleMission.pic",1 
  271. Unpack 13 To 0
  272. Wait Key 
  273. 'PU=enemy energy  ED=enemy damage   CP=cash prize
  274. PU=300 : ED=80 : CP=50
  275. 'Load Iff "Ninja Mission:whalefight.pic",1 
  276. Unpack 14 To 0
  277. Pen 6
  278. Goto FIGHT
  279. '
  280. '---------------------------------------->  Buy  Mission 
  281. BUYMISSION:
  282. 'Load Iff "Ninja Mission:buymission.pic",1 
  283. Unpack 15 To 0
  284. Locate 0,17 : Print "You have ";MO;" money"
  285. Locate 0,18 : Print "You need 30 dollars to buy life energy"
  286. Wait Key 
  287.   If MO<30 Then Goto NOMONEY
  288. Locate 0,20 : Print "you buy life energy"
  289. MO=MO-30 : LI=LI+300
  290. Goto MISSIONMENU
  291. '
  292. NOMONEY:
  293. Locate 0,20 : Print "you dont have enough money to buy"
  294. Wait Key 
  295. Goto MISSIONMENU
  296. '
  297. MAGICBO:
  298. MA=1
  299. Cls 
  300. Pen 0
  301. Print ""
  302. Print "  You didn't find the magic sword"
  303. Print ""
  304. Print "  but you found a magic bo."
  305. Print ""
  306. Print "  With the magic bo you have the power!!"
  307. Wait Key 
  308. Goto TEMPLE